{% load hash_filters %}
{% load comp_filters %}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmln = "http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" href="/adult/css/{{CSS_ROOT}}/service.css" type="text/css" media="all" charset="utf-8"/>
<link rel="stylesheet" href="/adult/css/{{CSS_ROOT}}/general.css" type="text/css" media="all" charset="utf-8"/>
<link rel="stylesheet" href="/adult/css/{{CSS_ROOT}}/dialog.css" type="text/css" media="all" charset="utf-8"/>
<link rel="stylesheet" href="/adult/css/{{CSS_ROOT}}/element.css" type="text/css" media="all" charset="utf-8"/>


<!-- YUI Components --> 
<script type="text/javascript" charset="utf-8"
        src="http://yui.yahooapis.com/3.2.0/build/yui/yui-min.js">
</script>
<script type="text/javascript" src="/adult/js/histogram.js"></script>
<script type="text/javascript" src="/adult/js/comps.js"></script>
<script type="text/javascript" src="/adult/js/dialog.js"></script>
<script type="text/javascript" src="/adult/js/ele.js"></script>

<script type="text/javascript">
function GetTitle(obj){
  var ns = obj.getElementsByTagName('div');
  for(var i=0;i<ns.length;i++){
    if(ns[i].className == 'title'){
      return ns[i].getElementsByTagName('h3')[0];
    }
  }
  return null;
}
function Init(){
  var mid = document.getElementById('mid-section');
  var left = document.getElementById('left-section');
  var right = document.getElementById('right-section');
  var basic_info = document.getElementById('info');
  var time_table = document.getElementById('timetable');
  var roster = document.getElementById('roster');
  var girls = document.getElementById('girls');
  var icon = document.getElementById('icon');
  var gallery = document.getElementById('gallery');
  var news = document.getElementById('post_list');
  InitDrag(document.getElementById('dd-shadow'));

  MarkAsArrangeV(mid,basic_info.parentNode,GetTitle(basic_info));
  MarkAsArrangeV(mid,time_table.parentNode,GetTitle(time_table));
  MarkAsArrangeV(mid,roster.parentNode,GetTitle(roster));
  MarkAsArrangeV(left,icon.parentNode,GetTitle(icon));
  MarkAsArrangeV(left,girls.parentNode,GetTitle(girls));
  MarkAsArrangeV(mid,news.parentNode,GetTitle(news));
  MarkAsArrangeV(right,gallery.parentNode,GetTitle(gallery));
  
  zoyoe.service_name = '{{SERVICE.name}}';
  zoyoe.comps['GIRLS'] = InitGirls(zoyoe);
  zoyoe.comps['GALLERY'] = InitGallery(zoyoe);
  zoyoe.comps['ROSTER'] = InitRoster(zoyoe,zoyoe.week_day.{{WEEK_DAY}});
  zoyoe.comps['POST'] = InitPost(zoyoe);
  zoyoe.comps['LAYOUT'] = InitLayout(zoyoe);
  zoyoe.comps['ICON'] = InitIcon(zoyoe);
  zoyoe.comps['TIME_TABLE'] = InitTimeTable(zoyoe);
}
</script>
</head>
<body onload='Init()'>
<div class = 'page'>
  <div id='title-bar'>
    <div class='nav'>
      <ul>
        <li class='menu'><a href='/adult/search/'>Home</a></li>
        {% if HAS_AUTHORITY %}
        <li class='menu' onclick ="zoyoe.comps['LAYOUT'].SaveLayout()"><a>Save Current Layout</a></li>
        <li class='menu' onclick ="zoyoe.comps['POST'].ShowAddDialog()"><a>Post</a></li>
        <li class='menu' onclick ="Template()"><a>Template</a></li>
        <li class='menu' onclick ="Logout()"><a>Logout</a></li>
        {% else %}
        <li class='menu' onclick ="ShowLoginDialog()"><a>Login</a></li>
        <li class='menu' onclick ="ShowRegisterDialog()"><a>Register</a></li>
        {% endif %}
      </ul>
      <div class='title'>
        <h3>Adult <span style="color:#ff25a5">Services</span></h3>
      </div>
    </div>
  </div>
  <div id="left-section" class='left-section'>
  {% include "comp/_comp_list_left.html" %}
  </div><!-- end of left section -->
  <div id="mid-section" class='mid-section'>
  {% include "comp/_comp_list_mid.html" %}
  </div><!-- end mid section -->
  <div id="right-section" class='right-section'>
  {% include "comp/_comp_list_right.html" %}
  </div><!-- end of right section -->
  <br style="clear:both"/>
  <div id="bottom-section" class='bottom-section'>
  <!--{% include 'comp/_post.html' %}-->
  </div>
</div>
<div id='zsk' class='msk'>
</div>
<div id = 'panel'>
  <div class='panel'>
    <div class='panel-hint'>
    </div>
    <div class='panel-content'>
    </div>
    <div class='button-lane'>
      <a onclick="zoyoe.comps['GALLERY'].Select(0,this)" class='gicon'></a>
      <a onclick="zoyoe.comps['GALLERY'].Select(1,this)" class='gicon'></a>
      <a onclick="zoyoe.comps['GALLERY'].Select(2,this)" class='gicon'></a>
      <a onclick="zoyoe.comps['GALLERY'].Select(3,this)" class='gicon'></a>
      <a onclick="zoyoe.comps['GALLERY'].Select(4,this)" class='gicon'></a>
      <a onclick="zoyoe.comps['GALLERY'].Select(5,this)" class='gicon'></a>
      <a onclick="zoyoe.comps['GALLERY'].Select(6,this)" class='gicon'></a>
    </div>
  </div>
</div>
<div id='dialog'>
  <div class='dialog'>
    <div class='dialog-hint'>
    </div>
    <div class='dialog-content'>
    </div>
    <div class='button-lane'>
      <input type='button' value='ok' onclick='SubmitForm()'/>
      <input type='button' value='cancel' onclick='zoyoe.HideDialog();'/>
    </div>
  </div>
</div>
<div id='dd-container' style="z-index:99;opacity:0.8;position:absolute;black;display:none;">
</div>
<div id='dd-shadow' class='section-container' style="position:absolute;border:1px dashed gray;display:none;">
</div>
<br style="clear:both"/>
<form name='reload' url='/adult/core/service/{{SERVICE.name}}/'></form>
</body>
</html>
